#ifndef CGFXOPENGL_H
#define CGFXOPENGL_H

#include <math.h>

#define PI 3.14159
#define TWO_PI PI*2.0
#define HALF_PI PI/2.0

// defined in CGfxOpenGL.cpp
void RGBtoHSV( float r, float g, float b, float *h, float *s, float *v );
void HSVtoRGB( float *r, float *g, float *b, float h, float s, float v );

int MIN(int a, int b);
int MAX(int a, int b);

float MIN(float a, float b);
float MAX(float a, float b);
    
float MIN(float a, float b, float c);
float MAX(float a, float b, float c);

float Abs(float a);

// positional and colored vertex structure
struct Vertex3F {
    float x, y, z;
    float r, g, b;
};



class CGfxOpenGL
{
private:
	int m_windowWidth;
	int m_windowHeight;

	float m_angle;
    GLUquadricObj* quadric;


public:
	CGfxOpenGL();
	virtual ~CGfxOpenGL();

	bool Init();
	bool Shutdown();

	void SetupProjection(int width, int height);

	void Prepare(float dt);
	void Render();
};


#endif